# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-string-hexconvert
_pkgname=String-HexConvert
pkgver=0.02
pkgrel=8
pkgdesc='Converts ascii strings to hex and reverse.'
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl>=0')
url='https://metacpan.org/pod/String::HexConvert'
source=("https://cpan.metacpan.org/authors/id/A/AH/AHERNIT/$_pkgname-$pkgver.tar.gz")
sha512sums=('be6e803326eb51c34a124256bcf6030c20440b9c1c23935b9ec70b8e7251c787936891eea21c200214d5996de50aaad237bd866c289f2b540b1541e1d344b53f')

build() {
  cd "$_pkgname-$pkgver"

  ( export PERL_MM_USE_DEFAULT=1 PERL5LIB="" PERL_AUTOINSTALL=--skipdeps \
    PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \
    PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \
    MODULEBUILDRC=/dev/null

    /usr/bin/perl Makefile.PL

    make
  )
}

package() {
  cd "$_pkgname-$pkgver"

  make install

  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}

